package org.lecric.wind44.server.model;

import java.util.Date;

import javax.jdo.annotations.IdGeneratorStrategy;
import javax.jdo.annotations.IdentityType;
import javax.jdo.annotations.PersistenceCapable;
import javax.jdo.annotations.Persistent;
import javax.jdo.annotations.PrimaryKey;

import com.google.appengine.api.users.User;

@PersistenceCapable(identityType = IdentityType.APPLICATION)
public class DBSpotInfo {
    @PrimaryKey
    @Persistent(valueStrategy = IdGeneratorStrategy.IDENTITY)
    private Long id;

    @Persistent
    private User author;

    @Persistent
    private String name;

    @Persistent
    private Date date;

    @Persistent
    private boolean pub;
    
    @Persistent
    private Long spot;

    @Persistent
	private String url;
    
    @Persistent
    private Integer order;

	public DBSpotInfo(User author, String name, String url, Date date, boolean pub, Long spot, Integer order) {
        this.author = author;
        this.name = name;
		this.url = url;
        this.date = date;
		this.pub = pub;
		this.spot = spot;
		this.order = order;
    }

    public Long getId() {
        return id;
    }

    public User getAuthor() {
        return author;
    }

    public String getName() {
        return name;
    }

    public Date getDate() {
        return date;
    }

    public void setAuthor(User author) {
        this.author = author;
    }

    public void setName(String content) {
        this.name = content;
    }

    public void setDate(Date date) {
        this.date = date;
    }
    
    public boolean isPub() {
		return pub;
	}

	public void setPub(boolean pub) {
		this.pub = pub;
	}

	public Long getSpot() {
		return spot;
	}

	public void setSpot(Long spot) {
		this.spot = spot;
	}

	public String getUrl() {
		return url;
	}

	public void setUrl(String url) {
		this.url = url;
	}

	public Integer getOrder() {
		return order;
	}

	public void setOrder(Integer order) {
		this.order = order;
	}
}
